// control.js
const app = getApp()
let that
Page({

  data: {
    barragerItems: {}
  },

  onLoad: function (options) {
    that = this
  },

  barragerOpen: function () {
    app.ajax({
      url: "/wechat/config/save", data: { "barrager": 1 },
      success: function (json) { }
    })
  },

  barragerClose: function () {
    app.ajax({
      url: "/wechat/config/save", data: { "barrager": 0 },
      success: function (json) { }
    })
  },

  shakeOpen: function () {
    app.ajax({
      url: "/wechat/config/save", data: { "shake": 1 },
      success: function (json) { }
    })
  },

  shakeClose: function () {
    app.ajax({
      url: "/wechat/config/save", data: { "shake": 0 },
      success: function (json) { }
    })
  }
})